From: Claudio Cambra Date: Thu, 27 Mar 2025 12:07:37 +0000 (+0100) Subject: gui/macOS: Properly retain/release NSFileProviderManager(s) X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2^2~62^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e91a0c181cad80468b5cd37545573ec54a8e1800;p=nextcloud-desktop.git gui/macOS: Properly retain/release NSFileProviderManager(s) Signed-off-by: Claudio Cambra --- diff --git a/src/gui/macOS/fileprovidereditlocallyjob_mac.mm b/src/gui/macOS/fileprovidereditlocallyjob_mac.mm index ec5ffcc75..483fc08ec 100644 --- a/src/gui/macOS/fileprovidereditlocallyjob_mac.mm +++ b/src/gui/macOS/fileprovidereditlocallyjob_mac.mm @@ -55,6 +55,7 @@ void FileProviderEditLocallyJob::openFileProviderFile(const QString &ocId) emit notAvailable(); } + [manager retain]; [manager getUserVisibleURLForItemIdentifier:nsOcId completionHandler:^(NSURL *const url, NSError *const error) { @@ -81,6 +82,7 @@ void FileProviderEditLocallyJob::openFileProviderFile(const QString &ocId) emit notAvailable(); }); } + [manager release]; }]; } diff --git a/src/gui/macOS/fileprovideritemmetadata_mac.mm b/src/gui/macOS/fileprovideritemmetadata_mac.mm index 9a4e00c89..8b79a60bd 100644 --- a/src/gui/macOS/fileprovideritemmetadata_mac.mm +++ b/src/gui/macOS/fileprovideritemmetadata_mac.mm @@ -132,6 +132,7 @@ QString FileProviderItemMetadata::getUserVisiblePath() const // getUserVisibleUrl is async, so wait here + [manager retain]; [manager getUserVisibleURLForItemIdentifier:nsItemIdentifier completionHandler:^(NSURL *const userVisibleFile, NSError *const error) { @@ -141,6 +142,7 @@ QString FileProviderItemMetadata::getUserVisiblePath() const returnPath = QString::fromNSString(userVisibleFile.path); } + [manager release]; dispatch_semaphore_signal(semaphore); }];